package com.quan.system.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 地区表
 * </p>
 *
 * @author 杨浩泉
 * @since 2019-06-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_system_area")
public class SystemArea implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * ID
	 */
	@TableId(value = "id", type = IdType.AUTO)
	private Integer id;

	/**
	 * PID
	 */
	private Integer pid;

	/**
	 * 层级
	 */
	private Integer level;

	/**
	 * 是否叶子
	 */
	private Boolean leaf;

	/**
	 * 区域编码
	 */
	private String code;

	/**
	 * 地区名称
	 */
	private String name;

	/**
	 * 邮编
	 */
	private String zipcode;

	/**
	 * 纬度
	 */
	private String latitude;

	/**
	 * 经度
	 */
	private String longitude;

	@TableField(exist = false)
	public List<SystemArea> children;
	
	@TableField(exist = false)
	private String label;

}
